const project = {
  state: {
    // 当前项目id
    projectId: 0,
    projectList: [],
    projectDataList: []
  },
  mutations: {
    SET_PROJECT_ID: (state, projectId) => {
      state.projectId = projectId
    },
    SET_PROJECT_LIST: (state, projectList) => {
      state.projectList = projectList
    },
    SET_PROJECT_DATA_LIST: (state, projectDataList) => {
      state.projectDataList = projectDataList
    }
  },
  actions: {
    setProjectId({ commit }, projectId) {
      commit('SET_PROJECT_ID', projectId)
    },
    setProjectList({ commit }, projectList) {
      commit('SET_PROJECT_LIST', projectList)
    },
    setProjectDataList({ commit }, projectDataList) {
      commit('SET_PROJECT_DATA_LIST', projectDataList)
    }
  }
}

export default project
